getOneAdmin2();
 var id="";
function getOneAdmin2() {
		$("#zhanghuxinxi").html("");
	  $("#jinbi").html("");
       $("#youhuijuan").html("");
	$.ajax({
		url: urlcore + "/api/order/wxStatisticsshop",
		type: "get",
		dataType: 'json',
		contentType: "application/json;charset=utf-8",
		success:function(data){
			if (data.success == true) {
				if(data.data!=null){
				var userName = data.data.user.wxName;
                id=data.data.user.id;
                var headimg=data.data.user.headImg;
                var dengluxinxi='<dl class="clearfix">'+
                '<dt>'+
                        '<img onerror="errorImg(this)" src="'+headimg+'">'+
                    '</a>'+
                '</dt>'+
                '<dd>'+
                    '<h5>'+
                        '<a href="../buy/12.6.0gerenziliao.html?id='+id+'">'+userName+'</a>'+
                    '</h5>'+
                 	'<h6><em>LV'+data.data.user.sellerLevel+'</em></h6>'+
                '</dd>'+
            '</dl>';
             //我的余额
            $("#wodeyue").attr("href","25.0.0zijinguanli.html?id="+id);
              //我的金币
            $("#wodejinbid").attr("href","23.0.0sell_wodejinbi.html?id="+id);
             //我的订单全部订单 
            $("#quabudingdan").attr("href","34.0.0sell_dingdan.html?id="+id);
            //今日推荐次数
            $("#tuijianchishu").attr("href","30.0.0jinrituijian.html?id="+id);
            
            //商品管理
            $("#shangpingguanli").attr("href","24.0.0goodsguanli.html?id="+id);
            //数据统计
            $("#shujutongji").attr("href","27.0.0shuju.html?id="+id);
            //评价管理
            $("#pingjiaguanli").attr("href","29.0.0pingjiaguanli.html?id="+id);
            
            
            //店铺管理 
            $("#dianpuguanli").attr("href","26.0.0xiugaidianpu.html?id="+id);
            //会员够买
       /*     $("#huiyuangoumai").attr("href",");*/
            //私密直播
            $("#shimizhibo").attr("href","20.5.0simizhibo.html?id="+id);
            //进入店铺
         
          
            //增值服务
            $("#zhengzhifuwu").attr("href","21.0.0zengzhifuwu.html?id="+id);
            //活动报名
            $("#huodongbaoming").attr("href","22.0.0huodong.html?id="+id);
            //自动推荐
            $("#zidongtuicun").attr("href","20.4.0zidongtuijian.html?id="+id);
            //代客下单
            $("#daikexiadan").attr("href","20.3.0daikexiadan.html?id="+id);
            //顾问评价
            $("#guwenpingjia").attr("href","20.2.0guwenpingfen.html?id="+id);
          $("#daifukuans").attr("href","34.1.0sell_dingdan_daifukuan.html?id="+id);
   
         $("#daifahuos").attr("href","34.2.0sell_dingdan_daifahuo.html?id="+id);
               
   $("#daishpuhuo").attr("href","34.3.0sell_dingdan_daishouhuo.html?id="+id);
            
   $("#tuikuans").attr("href","34.4.0sell_dingdan_daiqueren.html?id="+id);
   
   
      $("#zhanghuxinxi").html("&yen;"+data.data.balanceMoney);
              $("#jinbi").html(data.data.userGold);
   
				var order=data.data.DZFCount;
				var daifahuo=data.data.DFHCount;
				var daishouhuo=data.data.DSHCount;
				var tuikuan=data.data.refundCount;
				if(order!=0&&order!=null){
					var orderss='<em>'+order+'</em>';
					$("#daifukuan").html(orderss);
				}
				if(daifahuo!=0&&daifahuo!=null){
					var daifahuoss='<em>'+daifahuo+'</em>';
					$("#daifahuo").html(daifahuoss);
				}
				if(daishouhuo!=0&&daifahuo!=null){
					var daishouhuoss='<em>'+daishouhuo+'</em>';
					$("#daishouhuo").html(daishouhuoss);
				
				}
				if(tuikuan!=0&&tuikuan!=null){
					var tuikuanss='<em>'+tuikuan+'</em>';
					$("#tuikuan").html(tuikuanss);
				}
                  zhanghuxinxiss(id);
               $("#dengluxinxi").append(dengluxinxi);  
				}else{
                var dengluxinxi='<dl class="clearfix">'+
                '<dd>'+
                	'<a href="../1.3.0zhuce.html" class="buy_wode_denglu">去绑定手机号</a>'+
                '</dd>'+
            '</dl>';
             $("#dengluxinxi").append(dengluxinxi);  
				
				}
			}else{
                var dengluxinxi='<dl class="clearfix">'+
                '<dd>'+
                	'<a href="../1.3.0zhuce.html" class="buy_wode_denglu">去绑定手机号</a>'+
                '</dd>'+
            '</dl>';
             $("#dengluxinxi").append(dengluxinxi);  
				}
		},
		error:function() {
			alert("error");
		}
	});	
}











 function  zhanghuxinxiss(id){
   	$.ajax({
		url: urlcore + "/api/shopInfo/selectagno1?id="+id,
		type: "get",
		dataType: 'json',
		contentType: "application/json;charset=utf-8",
		success:function(data){
			if (data.success == true) {
				       
				       var shopyajing="";
				 if(data.data.sellerType!=1){
			 shopyajing+='<li><a href="../buy/16.1.0shenqing_wangluodian_jiaona.html" class="pel-list">'+
                '<div>'+
                    '<img src="../images/sell06.png">'+
                '</div>';
         
                  if(data.data.sellerType==2){
                  	 shopyajing+='<h5>工厂店</h5>';
                  }else{
                  	 shopyajing+='<h5>网批店</h5>';
                  }
            shopyajing+='</a></li>';
				 }
                 shopyajing+= '<li>'+
            '<a href="../buy/12.13.0huiyuangoumai.html?id='+id+'" id="huiyuangoumai" class="pel-list">'+
                '<div>'+
                    '<img src="../images/sell07.png">'+
                '</div>'+
                '<h5>会员购买</h5>'+
            '</a>'+
        '</li>';
				$("#shopyajing").append(shopyajing);
		   $("#jinrudianpu").attr("href","../6.0.0dianpu.html?id="+data.data.id);
			  //店铺装修
            $("#dianpuzhuangxiu").attr("href","31.1.0zhuangxiudianpu_mokuai.html?id="+data.data.id);
			}
		},
		error:function() {
			/* Act on the event */
			alert("error");
		}
	});	
}
